@echo off

for /f "tokens=*" %%i in ('CALL .\xpath0.1.bat pom.xml "/project/properties/custom.version"') do set version=%%i
ECHO version=%version%

DEL /S/Q .\out

MKDIR .\out\server\platform\dev\main\libs
MKDIR .\out\server\platform\common\libs
MKDIR .\out\server\platform\runtime\bcc\libs


COPY appconfig\web-appconfig-core\target\web-appconfig-core-%version%.jar .\out\server\platform\common\libs\web-appconfig-core.jar
COPY appconfig\web-appconfig-api\target\web-appconfig-api-%version%.jar .\out\server\platform\common\libs\web-appconfig-api.jar

COPY approval-format\web-approval-format-api\target\web-approval-format-api-%version%.jar .\out\server\platform\runtime\bcc\libs\web-approval-format-api.jar
COPY approval-format\web-approval-format-core\target\web-approval-format-core-%version%.jar .\out\server\platform\runtime\bcc\libs\web-approval-format-core.jar
COPY approval-format\web-approval-format-rpc\target\web-approval-format-rpc-%version%.jar .\out\server\platform\common\libs\web-approval-format-rpc.jar

COPY form-process\web-form-process\target\web-form-process-%version%.jar .\out\server\platform\dev\main\libs\web-form-process.jar

COPY jitengine-web-api\target\web-jitengine-web-api-%version%.jar .\out\server\platform\common\libs\web-jitengine-web-api.jar
COPY jitengine-web-core\target\web-jitengine-web-core-%version%.jar .\out\server\platform\common\libs\web-jitengine-web-core.jar

COPY metadata\web-pageflow-metadata\target\web-pageflow-metadata-%version%.jar .\out\server\platform\common\libs\web-pageflow-metadata.jar
COPY metadata\web-sourcecode-metadata\target\web-sourcecode-metadata-%version%.jar .\out\server\platform\common\libs\web-sourcecode-metadata.jar
COPY metadata\web-statemachine\target\web-statemachine-metadata-%version%.jar .\out\server\platform\common\libs\web-statemachine-metadata.jar

COPY npmpackage\web-npmpackage-api\target\web-npmpackage-api-%version%.jar .\out\server\platform\common\libs\web-npmpackage-api.jar
COPY npmpackage\web-npmpackage-core\target\web-npmpackage-core-%version%.jar .\out\server\platform\common\libs\web-npmpackage-core.jar

COPY runtime\runtime-api\target\web-jitengine-runtimebuild-api-%version%.jar .\out\server\platform\common\libs\web-jitengine-runtimebuild-api.jar
COPY runtime\runtime-core\target\web-jitengine-runtimebuild-core-%version%.jar .\out\server\platform\common\libs\web-jitengine-runtimebuild-core.jar

COPY scriptcache\runtime-scriptcache\target\web-jitengine-runtimebuild-scriptcache-%version%.jar .\out\server\platform\common\libs\web-jitengine-runtimebuild-scriptcache.jar
COPY scriptcache\runtime-scriptcache-api\target\web-jitengine-runtimebuild-scriptcache-api-%version%.jar .\out\server\platform\common\libs\web-jitengine-runtimebuild-scriptcache-api.jar

COPY tsfile\web-tsfile-api\target\web-tsfile-api-%version%.jar .\out\server\platform\common\libs\web-tsfile-api.jar
COPY tsfile\web-tsfile-core\target\web-tsfile-core-%version%.jar .\out\server\platform\common\libs\web-tsfile-core.jar

COPY web-common\target\web-jitengine-common-%version%.jar .\out\server\platform\common\libs\web-jitengine-common.jar

COPY web-designschema\target\web-designschema-%version%.jar .\out\server\platform\common\libs\web-designschema.jar
COPY web-designschema-api\target\web-designschema-api-%version%.jar .\out\server\platform\common\libs\web-designschema-api.jar

REM COPY web-dynamic-form-api\target\web-dynamicform-api-%version%.jar .\out\server\platform\common\libs\web-dynamicform-api.jar
REM COPY web-dynamic-form-core\target\web-dynamicform-core-%version%.jar .\out\server\platform\common\libs\web-dynamicform-core.jar

COPY web-form-jitengine\target\web-jitengine-%version%.jar .\out\server\platform\common\libs\web-jitengine.jar

COPY web-form-metadata\target\web-jitengine-formmetadata-%version%.jar .\out\server\platform\common\libs\web-jitengine-formmetadata.jar
COPY web-form-metadata-api\target\web-jitengine-formmetadata-api-%version%.jar .\out\server\platform\common\libs\web-jitengine-formmetadata-api.jar

REM COPY web-formconfig-api\target\web-formconfig-api-%version%.jar .\out\server\platform\common\libs\web-formconfig-api.jar
REM COPY web-formconfig-core\target\web-formconfig-core-%version%.jar .\out\server\platform\common\libs\web-formconfig-core.jar

REM COPY web-formmetadata-relycheck\target\web-formmetadata-relycheck-%version%.jar .\out\server\platform\dev\main\libs\web-formmetadata-relycheck.jar

COPY web-frontendproject\target\web-jitengine-frontendproject-%version%.jar .\out\server\platform\common\libs\web-jitengine-frontendproject.jar
COPY web-frontendproject-api\target\web-jitengine-frontendproject-api-%version%.jar .\out\server\platform\common\libs\web-jitengine-frontendproject-api.jar

REM COPY web-ide-api\target\web-ide-api-%version%.jar .\out\server\platform\common\libs\web-ide-api.jar
COPY web-ide-webapi\target\ide-config-webapi-%version%.jar .\out\server\platform\dev\main\libs\ide-config-webapi.jar
::pause
::pause


